<template>
    <scroll-view scroll-y="" class="content">
        <view class="wrap" style="background: rgb(229,238,217);">
            <view>编码</view>
            <view>负责人</view>
            <view>检修时间</view>
            <view>检修情况</view>
        </view>
        <view class="wrap" v-for="item,index in data" :key='index'
            :style="{borderWidth:'0rpx',backgroundColor:index%2==1?'#FAFAFA':'white'}">
            <view>{{item.asset_sn}}</view>
            <view>{{item.fzr_desc}}</view>
            <view>{{item.jxsj}}</view>
            <view>{{item.jxqk}}</view>
        </view>
        <view style="height: 200rpx;" />
    </scroll-view>
</template>

<script>
    import API from '@/common/api.js';
    export default {
        components: {},
        data() {
            return {
                pzhAuthorization: uni.getStorageSync('pzhAuthorization'),
                data: [],
                timer: null,
            }
        },
        onLoad(options) {
            this.getData(options.id)
        },
        onUnload() {

        },
        methods: {
            getData(asset_id) {
                API.selectJxjlDtl({
                    limit: 5,
                    offset: 0,
                    asset_id,
                    start: 0,
                    length: 1000000000,
                    pzhAuthorization: this.pzhAuthorization
                }).then(res => {
                    if(res.resCode=='success'){
                        uni.hideLoading()
                        this.data=res.datas
                    }
                })
            },
            changeNum(num) {
                return Number(Math.floor(Number(num) * 100) / 100).toFixed(2)
            }
        }
    }
</script>
<style scoped>
    /* #ifndef H5 */
    .content>>>.xdsoft_flipcountdown>.xdsoft_digit {
        transition-property: background-position;
        transition-duration: 0.5s;
    }

    /* #endif */
</style>
<style lang="less" scoped>
    .content {
        background: white;
        height: 100vh;

        .wrap {
            display: flex;
            border-top: 2rpx solid #dcdfe6;
            border-bottom: 2rpx solid #dcdfe6;
            flex-wrap: wrap;

            view {
                white-space: normal;
                word-break: break-all;
                font-size: 26rpx;
                padding: 20rpx;
                width: calc(25vw - 40rpx);
                display: flex;
                line-height: 40rpx;
                flex-direction: column;
                justify-content: center;
            }
            view:nth-child(2){
               width: calc(24vw - 40rpx);
            }
            view:nth-child(3){
               width: calc(26vw - 40rpx);
            }
        }

        .scroll {
            height: calc(100vh - 62rpx);

            view {
                color: #777777;
                border-bottom: 2rpx solid #dcdfe6;
            }
        }
    }
</style>
